﻿//using OpenAI.ObjectModels;

//public class MatlabToOpenClConversionTeamConfig : ChatChainConfigBase
//{
//    public override TalkingOrder TalkingOrder => TalkingOrder.InitiatorThenRoundTable;
//    protected override string defaultGptModel => Models.EnumToString(Models.Model.Gpt_4_turbo_preview);  //"gpt-4-turbo-preview";//

//    protected override string teamContextAwarenessHeader =>
//        "You are part of a small cuda dev team tasked with translating matlab function into opencl code and ensure its a successful translation, " +
//        "Your team follows the Test-Driven Development (TDD) methodology.";

//    public override string workspaceName => "Matlab To OpenCl Translation";

//    public override Dictionary<ChatAgentEnum, AgentSetupInfo> AgentSetupInfos => new Dictionary<ChatAgentEnum, AgentSetupInfo>() {
//        {ChatAgentEnum.Client, new AgentSetupInfo()
//        {
//            agentEnum = ChatAgentEnum.Client,
//            isHuman = true,
//            agentName = "Client",
//            whatItDoes = "You the client who requried the team to translate the code, you will be responsible for clarification of requirement, and also to help the team if team is looking for external help. ",
//            workPrinciple = WorkPrinciple,
//        }},
//        {ChatAgentEnum.ResultComparisonEngineer, new AgentSetupInfo(){
//            agentEnum = ChatAgentEnum.ResultComparisonEngineer,
//            isHuman = false,
//            agentName = "Result Comparison Engineer",
//            gptModel = defaultGptModel,
//            cleanMemoOnNewRoom = true,
//            whatItDoes = "You are a result comparison engineer, who is responsible for comparing OpenCl output and matlab output, then give descripsion of the difference in data in detail.",
//            workPrinciple = WorkPrinciple,
//            canFuncCall = true,
//        }},
//        {ChatAgentEnum.MatlabToOpenClConversionEngineer, new AgentSetupInfo()
//        {
//            agentEnum = ChatAgentEnum.MatlabToOpenClConversionEngineer,
//            isHuman = false,
//            agentName = "Matlab To OpenCl Conversion engineer",
//            gptModel = defaultGptModel,
//            cleanMemoOnNewRoom = false,
//            whatItDoes = "You are a Matlab To OpenCl Conversion engineer, who is responsible to convert matlab function to opencl function.",
//            workPrinciple = WorkPrinciple,
//            canFuncCall = true,
//        }},
//        {ChatAgentEnum.FeatureOwner, new AgentSetupInfo()
//        {
//            agentEnum = ChatAgentEnum.FeatureOwner,
//            isHuman = false,
//            agentName = "Feature Owner",
//            gptModel = defaultGptModel,
//            cleanMemoOnNewRoom = false,
//            whatItDoes =
//            "Verify with client regarding any uncertainties that might happen during translation process. Make no assumptions. ",
//            workPrinciple = WorkPrinciple,
//            canFuncCall = true,
//        }},
//        {ChatAgentEnum.TechLead, new AgentSetupInfo()
//        {
//            agentEnum = ChatAgentEnum.TechLead,
//            isHuman = false,
//            agentName = "Tech Lead",
//            gptModel = defaultGptModel,
//            cleanMemoOnNewRoom = false,
//            whatItDoes =
//            "Gathering of matlab code path and opencl code path. Check if the matlab file actually exist. Load the matlab script then verify " +
//            "with client regarding any uncertainties that might happen during translation process. Make no assumptions. Look into the project structure and have a general idea of how/where to make the code translation. ",
//            workPrinciple = WorkPrinciple,
//            canFuncCall = true,
//        }}
//        ,
//    };

//    public override List<ChatChainPhase> phases => new() {
//        new ChatChainPhase(){
//            phaseName = "Matlab function to OpenCl function translation",
//            phaseDescription = "Matlab function to OpenCl function translation",
//            phaseSteps = new(){
//                new ChatStep(){
//                    chatStepPurpose = "Requirement Gathering",
//                    chatRooms = new(){
//                        new ChatRoom(){
//                            meetingHost = ChatAgentEnum.FeatureOwner,
//                            meetingHostInitiator =
//                            "Requirements as follow:\n" +
//                            "Matlab Function: D:\\MMWRelated\\PostAnalysis\\read_ADC_bin_TDA2_separateFiles_partial.m,\n" +
//                            "OpenCl file path: C:\\Users\\libra34567\\console-application-open-cl\\console-application-open-cl\\OpenCLCode\\RawAdcDealer.cl , \n" +
//                            "OpenCl host project sln path: C:\\Users\\libra34567\\console-application-open-cl\\ConsoleApplicationOpenCl.sln, \n" +
//                            "\n" +
//                            "Some Q&A here:\n" +
//                            "   1. Regarding complex number handling, have the type to be float2 which is supported by opencl,\n" +
//                            "   2. Only translate RawAdcDealer, the rest of the code is for context.\n" +
//                            "   3. regarding file I/O, they will be handled in host application.\n",

//                            roomName = "Requirement Gathering",
//                            roomGoal = "Look into the provided matlab function and ensure everybody in this chatroom understood the requirement well, clarify with client if needed. " +
//                            "After its clear, have conversion engineer create a implementation plan and verify with others. ",
//                            agentRequired = new()
//                            {
//                                new RequiredAgentInRoomInfo(){ agentEnum = ChatAgentEnum.Client,
//                                    agentGoal = "client of Matlab to Opencl Translation Team. Responsible for giving out requirements and clarifying them if needed"},
//                                new RequiredAgentInRoomInfo(){ agentEnum = ChatAgentEnum.FeatureOwner,
//                                    agentGoal = "feature owner of translator team. Gather matlab code path and opencl code path, " +
//                                    "Read the matlab function and verify any doubts with client"},
//                                new RequiredAgentInRoomInfo(){ agentEnum = ChatAgentEnum.TechLead,
//                                    agentGoal = "tech lead of translator team."},
//                                new RequiredAgentInRoomInfo(){ agentEnum = ChatAgentEnum.ResultComparisonEngineer,
//                                                                    agentGoal = "You will later be responsible to compare the output of the original matlab function and the output of translated opencl code. " +
//                                                                            "At this stage simply listen to what other discuss. "},
//                            }
//                        }
//                    }
//                },
//                new ChatStep()
//                {
//                    chatStepPurpose = "Implementation planning",
//                    chatRooms = new()
//                    {
//                        new ChatRoom()
//                        {
//                            meetingHost = ChatAgentEnum.TechLead,
//                            meetingHostInitiator =
//                                "Explore the c++/opencl project structure, discuss where and how to implement the code translation. ",
//                            roomName = "Implementation Planning",
//                            roomGoal = "Explore the c++/opencl project structure, discuss where and how to implement the code translation. Create implementation plan. ",
//                            agentRequired = new()
//                            {
//                                new RequiredAgentInRoomInfo(){ agentEnum = ChatAgentEnum.MatlabToOpenClConversionEngineer,
//                                                                   agentGoal = "matlab to openCl conversion engineer. Mostly discuss implementation plan with tech lead. "},
//                                new RequiredAgentInRoomInfo(){ agentEnum = ChatAgentEnum.TechLead,
//                                                                    agentGoal = "tech lead of translator team. Explore the c++/opencl project structure, discuss where and how to implement the code translation. Create implementation plan. "},
//                                new RequiredAgentInRoomInfo(){ agentEnum = ChatAgentEnum.Client,
//                                                                   agentGoal = "Client"},
//                            }
//                        }
//                    }
//                },
//                new ChatStep()
//                {
//                    chatStepPurpose = "Conversion",
//                    chatRooms = new()
//                    {
//                        new ChatRoom()
//                        {
//                            meetingHost = ChatAgentEnum.MatlabToOpenClConversionEngineer,
//                            meetingHostInitiator = 
//                                "Implement the received requirement, run the sln project that include this cl script, " +
//                            "check the result and iterate until successful implementation. ",
//                            roomName = "Implementation",
//                            roomGoal = "Implement the received requirement, run the sln project that include this cl script, check the result and iterate until successful implementation. ",
//                            agentRequired = new()
//                            {
//                                new RequiredAgentInRoomInfo(){ agentEnum = ChatAgentEnum.MatlabToOpenClConversionEngineer,
//                                                                   agentGoal = "conversion engineer of translator team. Implement the received requirement, have the result comparison engineer test the code, " +
//                                                                                " and iterate until successful implementation. "},
//                                new RequiredAgentInRoomInfo(){ agentEnum = ChatAgentEnum.Client,
//                                                                   agentGoal = "Client"},
//                                new RequiredAgentInRoomInfo(){ agentEnum = ChatAgentEnum.ResultComparisonEngineer, 
//                                                                    agentGoal = "Once conversion engineer update the .cl file, run the sln project that include this cl script, check the result." +
//                                                                                "Don't worry about host application, its setup in the way that, once RawAdcDealer.cl is updated, and when you ran the project, it will run RawAdcDealer"}
//                            }
//                        }
//                    }
//                },
//            },
//        },
//    };

//    protected override string WorkPrinciple =>
//                "#### Given chat message you received, and always take into consideration in terms of other chatroom members' background:\n" +
//                "   1. Each chat request you received might composed of messages from multiple members, with indicator which message comes from whom.  \n" +
//                "   2. For each individual messages in that chat request:\n" +
//                //"       a. Give detailed reply if you can provide insightful information.\n" +
//                //"       b. Give less detailed reply if you can provide less insightful information in comparison with other members in the chatroom. \n" +
//                // "       c. You can decide how lengthy the reply is based on how much you can contribute to this conversation or to the goal of the meeting. \n" +
//                // "   3. NEVER PASS or ignore if you are directly mentioned/@ed or instructed to do something. \n" +
//                //"   4. If you are not mentioned/instructed, and you don't feel like you could contribute to this conversation or to the goal, in this case Reply with only \"[PASS]\", No explaination, no punctuation apart from [].\n" +
//                "#### When sending out chat messages:\n" +
//                "   1. Use instruct type prompting more often when you need other agents in the chatroom to assist you, instead of just thinking out loud. \n" +
//                "       E.g., Hey @Someone_In_ChatRoom, do xx for me/tell me something about xxx etc. \n" +
//                "   2. Always @ a person's name when using instruct type prompting. \n" +
//                "#### When you believe the goal of the current chatroom is achieved:\n" +
//                "   1. Ask other members if they also believe so. Or if they have something more that they would like to discuss. \n" +
//                "   2. Only after all members reached consensus regarding whether the goal is achieved, each member should then invoke the VoteForChatRoomCompletion function. \n";
//}
